package com.tangfuzhong.aop2;

/**
 * <p><em>Created on 2021/12/28 5:04 下午</em></p>
 *
 * @author fuzhongtang
 * @since 1.0.1
 */
public class UserDaoImpl {

    public int addUser(String user) {
        System.out.println("保存了一个用户 " + user);
        return 1;

    }

    public int deleteUser(int id) {

        if (id <= 0 || id > 99999999) {
            throw new IllegalArgumentException("参数id不能大于99999999或小于0");
        }

        System.out.println("删除了id为" + id + "用户");
        return 1;
    }

}
